cmake_minimum_required(VERSION 3.16)
project(lession)
file(GLOB  FileList  *)
foreach(list  ${FileList})
    if(IS_DIRECTORY ${list})
        string(REGEX MATCH "[^/\\]+[/\\]*$" rp ${list})
        if( ${rp}  STREQUAL "build" )
            message(STATUS "Build path. ${rp}")
        elseif( ${rp}  STREQUAL ".git" )
            message(STATUS "Git path. ${rp}")
        else()
            message(STATUS  ${rp})
            file(GLOB  SRC  ${list}/*.cpp ${list}/*.c)
            add_executable(${rp} ${SRC})
        endif()
    endif()
endforeach(list)
